package com.baibei.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;

/**
 * Created by shenminjie on 2017/10/30.
 * mail:shenminjie@100bei.com
 */

public class PayModeInfo implements Serializable, Parcelable {
    private String id;

    @Override
    public String toString() {
        return "PayModeInfo{" +
                "id='" + id + '\'' +
                ", payCode='" + payCode + '\'' +
                ", payName='" + payName + '\'' +
                ", payUrl='" + payUrl + '\'' +
                ", payLogoUrl='" + payLogoUrl + '\'' +
                ", state='" + state + '\'' +
                ", fundCallbackUrl='" + fundCallbackUrl + '\'' +
                ", isSelect=" + isSelect +
                '}';
    }

    public String getFundCallbackUrl() {
        return fundCallbackUrl;
    }

    public void setFundCallbackUrl(String fundCallbackUrl) {
        this.fundCallbackUrl = fundCallbackUrl;
    }

    private String payCode;

    private String payName;

    private String payUrl;

    private String payLogoUrl;

    private String state;

    private String fundCallbackUrl;

    private boolean isSelect;

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public boolean isSelect() {
        return isSelect;
    }

    public void setSelect(boolean select) {
        isSelect = select;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getPayCode() {
        return payCode;
    }

    public void setPayCode(String payCode) {
        this.payCode = payCode;
    }

    public String getPayName() {
        return payName;
    }

    public void setPayName(String payName) {
        this.payName = payName;
    }

    public String getPayUrl() {
        return payUrl;
    }

    public void setPayUrl(String payUrl) {
        this.payUrl = payUrl;
    }

    public String getPayLogoUrl() {
        return payLogoUrl;
    }

    public void setPayLogoUrl(String payLogoUrl) {
        this.payLogoUrl = payLogoUrl;
    }

    public PayModeInfo(String payName, boolean isSelect) {

        this.payName = payName;
        this.isSelect = isSelect;
    }

    public PayModeInfo() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.payCode);
        dest.writeString(this.payName);
        dest.writeString(this.payUrl);
        dest.writeString(this.payLogoUrl);
        dest.writeString(this.fundCallbackUrl);
        dest.writeByte(this.isSelect ? (byte) 1 : (byte) 0);
    }

    protected PayModeInfo(Parcel in) {
        this.id = in.readString();
        this.payCode = in.readString();
        this.payName = in.readString();
        this.payUrl = in.readString();
        this.payLogoUrl = in.readString();
        this.fundCallbackUrl = in.readString();
        this.isSelect = in.readByte() != 0;
    }

    public static final Creator<PayModeInfo> CREATOR = new Creator<PayModeInfo>() {
        @Override
        public PayModeInfo createFromParcel(Parcel source) {
            return new PayModeInfo(source);
        }

        @Override
        public PayModeInfo[] newArray(int size) {
            return new PayModeInfo[size];
        }
    };
}
